package chan.module.project.database.vastdata.bcg;

/**
 * A collection of utilities to manipulate strings.
 *
 * @author wdeclerc
 */
public class StringUtil {
    public static final String UNIX_OPEN = "${";

    public static final String UNIX_CLOSE = "}";

    public static final String WINDOWS_OPEN = "%%";

    public static final String WINDOWS_CLOSE = "%%";

    public static final String HEX_OPEN = "$[";
    public static final String HEX_CLOSE = "]";

    public static final String CRLF = "\r\n"; //$NON-NLS-1$

    public static final String INDENTCHARS = "                    "; //$NON-NLS-1$

    public static final String[] SYSTEM_PROPERTIES = new String[]{
            "java.version",
            "java.vendor",
            "java.vendor.url",
            "java.home",
            "java.vm.specification.version",
            "java.vm.specification.vendor",
            "java.vm.specification.name",
            "java.vm.version",
            "java.vm.vendor",
            "java.vm.name",
            "java.specification.version",
            "java.specification.vendor",
            "java.specification.name",
            "java.class.version",
            "java.class.path",
            "java.library.path",
            "java.io.tmpdir",
            "java.compiler",
            "java.ext.dirs",

            "os.name",
            "os.arch",
            "os.version",

            "file.separator",
            "path.separator",
            "line.separator",

            "user.name",
            "user.home",
            "user.dir",
            "user.country",
            "user.language",
            "user.timezone",

            "org.apache.commons.logging.Log",
            "org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
            "org.apache.commons.logging.simplelog.showdatetime",
            "org.eclipse.swt.browser.XULRunnerInitialized",
            "org.eclipse.swt.browser.XULRunnerPath",

            "sun.arch.data.model",
            "sun.boot.class.path",
            "sun.boot.library.path",
            "sun.cpu.endian",
            "sun.cpu.isalist",
            "sun.io.unicode.encoding",
            "sun.java.launcher",
            "sun.jnu.encoding",
            "sun.management.compiler",
            "sun.os.patch.level",
    };

    public static final boolean isEmpty(String string) {
        return string == null || string.length() == 0;
    }
}